package com.cskaoyan.mapper.wx_orderB;

import com.cskaoyan.bean.wx_order.MarketOrder;
import com.cskaoyan.bean.wx_order.MarketOrderExample;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import org.apache.ibatis.annotations.Param;



public interface MarketOrderMapper {
    long countByExample(MarketOrderExample example);

    int deleteByExample(MarketOrderExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(MarketOrder record);

    int insertSelective(MarketOrder record);

    List<MarketOrder> selectByExample(MarketOrderExample example);

    MarketOrder selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") MarketOrder record, @Param("example") MarketOrderExample example);

    int updateByExample(@Param("record") MarketOrder record, @Param("example") MarketOrderExample example);

    int updateByPrimaryKeySelective(MarketOrder record);

    int updateByPrimaryKey(MarketOrder record);

    void updateCauseByShip(Integer orderId, String shipChannel, String shipSn, Date data);

    void updateCauseByRefund(Integer orderId, BigDecimal refundMoney, Date date);

    //OrderDetailInnerInfo selectOrderDetailById(Integer orderId);

    Integer getOrderStatus(Integer orderId);

    void deleteByOrderIdInLogic(Integer orderId);

    void orderCancelById(Integer orderId);

    void orderConfrimById(Integer orderId, Integer commentNum);

    void orderRefundById(Integer orderId);

    void updateCommentNumById(Integer orderId);


    void createAfterCart(@Param("userId") Integer userId, @Param("orderSn") String orderSn, @Param("username") String username, @Param("address") String address, @Param("tel") String tel, @Param("message") String message);


    void updatePrice(@Param("orderId") Integer orderId, @Param("allSum") BigDecimal allSum, @Param("discount") BigDecimal discount, @Param("afterDiscount") BigDecimal afterDiscount);

    void updatePriceAndShip(@Param("orderId") Integer orderId, @Param("allSum") BigDecimal allSum, @Param("discount") BigDecimal discount, @Param("afterDiscount") BigDecimal afterDiscount);

}